package com.mentalsurvey.mapper;

import com.mentalsurvey.entity.Score;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ScoreMapper {
    int insertScore(Score score);

    @Select("SELECT total_score, paper_id, answers FROM score WHERE user_id = #{userId}")
    List<Score> getScoreByUserId(@Param("userId") int userId);
}

